﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入字符串");
            string y = Console.ReadLine();
            int a = 0;
            int b = 0;
            int c = 0;
            foreach (var item in y)
            {
                if (char.IsLetter(item))
                {
                    a++;
                }
                else if (char.IsNumber(item))
                {
                    b++;
                }
                else if (char.IsWhiteSpace(item))
                {
                    c++;
                }
            }
            Console.WriteLine("其中英文字母有{0}、数字有{1}、空格的个数{2}",a,b,c);
            
            
        }
    }
}
